package com.tzu.ft.transfer.client;

import java.net.Socket;

import com.tzu.ft.base.TransferTools;
import com.tzu.ft.transfer.ClientUI;
import com.tzu.ssl.KeyInfo;

/**
 *
 * 客户端实现类，非ssl
 */
public class FTClient extends Client {

	@Override
	public void init(String host, int port, KeyInfo keyInfo, ClientUI ui) throws Exception {
		this.host = host;
		this.port = port;
		this.ui = ui;
		socket = new Socket(host, port);
//		socket.setSendBufferSize(BUFFER_SIZE);
//		socket.setReceiveBufferSize(BUFFER_SIZE);
//		socket.setSoTimeout(TransferTools.DEFAULT_SO_TIMEOUT);
		socket = TransferTools.settingClient(socket);
	}

}
